/* tslint:disable */
/* eslint-disable */
/*
Humanloop API

The Humanloop API allows you to interact with Humanloop from your product or service.

You can do this through HTTP requests from any language or via our official Python or TypeScript SDK.

To install the official [Python SDK](https://pypi.org/project/humanloop/), run the following command:

```bash
pip install humanloop
```

To install the official [TypeScript SDK](https://www.npmjs.com/package/humanloop), run the following command:

```bash
npm i humanloop
```

---

Guides and further details about key concepts can be found in [our docs](https://docs.humanloop.com/).

The version of the OpenAPI document: 4.0.1


NOTE: This file is auto generated by Konfig (https://konfigthis.com).
*/

import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
import { Configuration } from '../configuration';
// Some imports not used depending on template conditions
// @ts-ignore
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, isBrowser } from '../common';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
// @ts-ignore
import { ChatMessage } from '../models';
// @ts-ignore
import { ConfigProperty } from '../models';
// @ts-ignore
import { FeedbackLabelsProperty } from '../models';
// @ts-ignore
import { HTTPValidationError } from '../models';
// @ts-ignore
import { LogDatapointRequest } from '../models';
// @ts-ignore
import { LogResponse } from '../models';
// @ts-ignore
import { LogsLogResponse } from '../models';
// @ts-ignore
import { PaginatedDataLogResponse } from '../models';
// @ts-ignore
import { UpdateLogRequest } from '../models';
import { paginate } from "../pagination/paginate";
import type * as buffer from "buffer"
import { requestBeforeHook } from '../requestBeforeHook';
/**
 * LogsApi - axios parameter creator
 * @export
 */
export const LogsApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * 
         * @summary Delete Logs
         * @param {Array<string>} [id] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        delete: async (id?: Array<string>, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/logs`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions: AxiosRequestConfig = { method: 'DELETE', ...baseOptions, ...options};
            const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {} as any;
            const localVarQueryParameter = {} as any;

            // authentication APIKeyHeader required
            await setApiKeyToObject({ object: localVarHeaderParameter, key: "X-API-KEY", keyParamName: "xAPIKEY", configuration })
            if (id) {
                localVarQueryParameter['id'] = id;
            }


    
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            requestBeforeHook({
                queryParameters: localVarQueryParameter,
                requestConfig: localVarRequestOptions,
                path: localVarPath,
                configuration,
                pathTemplate: '/logs',
                httpMethod: 'DELETE'
            });

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Retrieve paginated logs from the server.  Sorting and filtering are supported through query params. See docstring of get_sorted_filtered_project_data_from_query_params for more details.
         * @summary Get Logs
         * @param {string} projectId 
         * @param {string} [search] 
         * @param {string} [metadataSearch] 
         * @param {string | Date} [startDate] 
         * @param {string | Date} [endDate] 
         * @param {number} [size] 
         * @param {number} [page] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        list: async (projectId: string, search?: string, metadataSearch?: string, startDate?: string | Date, endDate?: string | Date, size?: number, page?: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'projectId' is not null or undefined
            assertParamExists('list', 'projectId', projectId)
            const localVarPath = `/logs`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions: AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
            const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {} as any;
            const localVarQueryParameter = {} as any;

            // authentication APIKeyHeader required
            await setApiKeyToObject({ object: localVarHeaderParameter, key: "X-API-KEY", keyParamName: "xAPIKEY", configuration })
            if (projectId !== undefined) {
                localVarQueryParameter['project_id'] = projectId;
            }

            if (search !== undefined) {
                localVarQueryParameter['search'] = search;
            }

            if (metadataSearch !== undefined) {
                localVarQueryParameter['metadata_search'] = metadataSearch;
            }

            if (startDate !== undefined) {
                localVarQueryParameter['start_date'] = (startDate as any instanceof Date) ?
                    (startDate as any).toISOString().substr(0,10) :
                    startDate;
            }

            if (endDate !== undefined) {
                localVarQueryParameter['end_date'] = (endDate as any instanceof Date) ?
                    (endDate as any).toISOString().substr(0,10) :
                    endDate;
            }

            if (size !== undefined) {
                localVarQueryParameter['size'] = size;
            }

            if (page !== undefined) {
                localVarQueryParameter['page'] = page;
            }


    
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            requestBeforeHook({
                queryParameters: localVarQueryParameter,
                requestConfig: localVarRequestOptions,
                path: localVarPath,
                configuration,
                pathTemplate: '/logs',
                httpMethod: 'GET'
            });

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Log a datapoint or array of datapoints to your Humanloop project.
         * @summary Log
         * @param {LogDatapointRequest} logDatapointRequest 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        log: async (logDatapointRequest: LogDatapointRequest, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'logDatapointRequest' is not null or undefined
            assertParamExists('log', 'logDatapointRequest', logDatapointRequest)
            const localVarPath = `/logs`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
            const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {} as any;
            const localVarQueryParameter = {} as any;

            // authentication APIKeyHeader required
            await setApiKeyToObject({ object: localVarHeaderParameter, key: "X-API-KEY", keyParamName: "xAPIKEY", configuration })

    
            localVarHeaderParameter['Content-Type'] = 'application/json';


            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            requestBeforeHook({
                requestBody: logDatapointRequest,
                queryParameters: localVarQueryParameter,
                requestConfig: localVarRequestOptions,
                path: localVarPath,
                configuration,
                pathTemplate: '/logs',
                httpMethod: 'POST'
            });
            localVarRequestOptions.data = serializeDataIfNeeded(logDatapointRequest, localVarRequestOptions, configuration)

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Update a logged datapoint in your Humanloop project.
         * @summary Update
         * @param {string} id String ID of logged datapoint to return. Starts with &#x60;data_&#x60;.
         * @param {UpdateLogRequest} updateLogRequest 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        update: async (id: string, updateLogRequest: UpdateLogRequest, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'id' is not null or undefined
            assertParamExists('update', 'id', id)
            // verify required parameter 'updateLogRequest' is not null or undefined
            assertParamExists('update', 'updateLogRequest', updateLogRequest)
            const localVarPath = `/logs/{id}`
                .replace(`{${"id"}}`, encodeURIComponent(String(id !== undefined ? id : `-id-`)));
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions: AxiosRequestConfig = { method: 'PATCH', ...baseOptions, ...options};
            const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {} as any;
            const localVarQueryParameter = {} as any;

            // authentication APIKeyHeader required
            await setApiKeyToObject({ object: localVarHeaderParameter, key: "X-API-KEY", keyParamName: "xAPIKEY", configuration })

    
            localVarHeaderParameter['Content-Type'] = 'application/json';


            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            requestBeforeHook({
                requestBody: updateLogRequest,
                queryParameters: localVarQueryParameter,
                requestConfig: localVarRequestOptions,
                path: localVarPath,
                configuration,
                pathTemplate: '/logs/{id}',
                httpMethod: 'PATCH'
            });
            localVarRequestOptions.data = serializeDataIfNeeded(updateLogRequest, localVarRequestOptions, configuration)

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Update a logged datapoint by its reference ID.  The `reference_id` query parameter must be provided, and refers to the `reference_id` of a previously-logged datapoint.
         * @summary Update By Reference Id
         * @param {string} referenceId A unique string to reference the datapoint. Identifies the logged datapoint created with the same &#x60;reference_id&#x60;.
         * @param {UpdateLogRequest} updateLogRequest 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateByRef: async (referenceId: string, updateLogRequest: UpdateLogRequest, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
            // verify required parameter 'referenceId' is not null or undefined
            assertParamExists('updateByRef', 'referenceId', referenceId)
            // verify required parameter 'updateLogRequest' is not null or undefined
            assertParamExists('updateByRef', 'updateLogRequest', updateLogRequest)
            const localVarPath = `/logs`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }

            const localVarRequestOptions: AxiosRequestConfig = { method: 'PATCH', ...baseOptions, ...options};
            const localVarHeaderParameter = configuration && !isBrowser() ? { "User-Agent": configuration.userAgent } : {} as any;
            const localVarQueryParameter = {} as any;

            // authentication APIKeyHeader required
            await setApiKeyToObject({ object: localVarHeaderParameter, key: "X-API-KEY", keyParamName: "xAPIKEY", configuration })
            if (referenceId !== undefined) {
                localVarQueryParameter['reference_id'] = referenceId;
            }


    
            localVarHeaderParameter['Content-Type'] = 'application/json';


            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
            requestBeforeHook({
                requestBody: updateLogRequest,
                queryParameters: localVarQueryParameter,
                requestConfig: localVarRequestOptions,
                path: localVarPath,
                configuration,
                pathTemplate: '/logs',
                httpMethod: 'PATCH'
            });
            localVarRequestOptions.data = serializeDataIfNeeded(updateLogRequest, localVarRequestOptions, configuration)

            setSearchParams(localVarUrlObj, localVarQueryParameter);
            return {
                url: toPathString(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
    }
};

/**
 * LogsApi - functional programming interface
 * @export
 */
export const LogsApiFp = function(configuration?: Configuration) {
    const localVarAxiosParamCreator = LogsApiAxiosParamCreator(configuration)
    return {
        /**
         * 
         * @summary Delete Logs
         * @param {LogsApiDeleteRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async delete(requestParameters: LogsApiDeleteRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.delete(requestParameters.id, options);
            return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
        },
        /**
         * Retrieve paginated logs from the server.  Sorting and filtering are supported through query params. See docstring of get_sorted_filtered_project_data_from_query_params for more details.
         * @summary Get Logs
         * @param {LogsApiListRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async list(requestParameters: LogsApiListRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PaginatedDataLogResponse>> {
            const localVarAxiosArgs = await localVarAxiosParamCreator.list(requestParameters.projectId, requestParameters.search, requestParameters.metadataSearch, requestParameters.startDate, requestParameters.endDate, requestParameters.size, requestParameters.page, options);
            return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
        },
        /**
         * Log a datapoint or array of datapoints to your Humanloop project.
         * @summary Log
         * @param {LogsApiLogRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async log(requestParameters: LogsApiLogRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<LogsLogResponse>> {
            const logDatapointRequest: LogDatapointRequest = requestParameters;
            const localVarAxiosArgs = await localVarAxiosParamCreator.log(logDatapointRequest, options);
            return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
        },
        /**
         * Update a logged datapoint in your Humanloop project.
         * @summary Update
         * @param {LogsApiUpdateRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async update(requestParameters: LogsApiUpdateRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<LogResponse>> {
            const updateLogRequest: UpdateLogRequest = {
                output: requestParameters.output,
                error: requestParameters.error,
                duration: requestParameters.duration
            };
            const localVarAxiosArgs = await localVarAxiosParamCreator.update(requestParameters.id, updateLogRequest, options);
            return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
        },
        /**
         * Update a logged datapoint by its reference ID.  The `reference_id` query parameter must be provided, and refers to the `reference_id` of a previously-logged datapoint.
         * @summary Update By Reference Id
         * @param {LogsApiUpdateByRefRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async updateByRef(requestParameters: LogsApiUpdateByRefRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<LogResponse>> {
            const updateLogRequest: UpdateLogRequest = {
                output: requestParameters.output,
                error: requestParameters.error,
                duration: requestParameters.duration
            };
            const localVarAxiosArgs = await localVarAxiosParamCreator.updateByRef(requestParameters.referenceId, updateLogRequest, options);
            return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
        },
    }
};

/**
 * LogsApi - factory interface
 * @export
 */
export const LogsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
    const localVarFp = LogsApiFp(configuration)
    return {
        /**
         * 
         * @summary Delete Logs
         * @param {LogsApiDeleteRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        delete(requestParameters: LogsApiDeleteRequest, options?: AxiosRequestConfig): AxiosPromise<void> {
            return localVarFp.delete(requestParameters, options).then((request) => request(axios, basePath));
        },
        /**
         * Retrieve paginated logs from the server.  Sorting and filtering are supported through query params. See docstring of get_sorted_filtered_project_data_from_query_params for more details.
         * @summary Get Logs
         * @param {LogsApiListRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        list(requestParameters: LogsApiListRequest, options?: AxiosRequestConfig): AxiosPromise<PaginatedDataLogResponse> {
            return localVarFp.list(requestParameters, options).then((request) => request(axios, basePath));
        },
        /**
         * Log a datapoint or array of datapoints to your Humanloop project.
         * @summary Log
         * @param {LogsApiLogRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        log(requestParameters: LogsApiLogRequest, options?: AxiosRequestConfig): AxiosPromise<LogsLogResponse> {
            return localVarFp.log(requestParameters, options).then((request) => request(axios, basePath));
        },
        /**
         * Update a logged datapoint in your Humanloop project.
         * @summary Update
         * @param {LogsApiUpdateRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        update(requestParameters: LogsApiUpdateRequest, options?: AxiosRequestConfig): AxiosPromise<LogResponse> {
            return localVarFp.update(requestParameters, options).then((request) => request(axios, basePath));
        },
        /**
         * Update a logged datapoint by its reference ID.  The `reference_id` query parameter must be provided, and refers to the `reference_id` of a previously-logged datapoint.
         * @summary Update By Reference Id
         * @param {LogsApiUpdateByRefRequest} requestParameters Request parameters.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateByRef(requestParameters: LogsApiUpdateByRefRequest, options?: AxiosRequestConfig): AxiosPromise<LogResponse> {
            return localVarFp.updateByRef(requestParameters, options).then((request) => request(axios, basePath));
        },
    };
};

/**
 * Request parameters for delete operation in LogsApi.
 * @export
 * @interface LogsApiDeleteRequest
 */
export type LogsApiDeleteRequest = {
    
    /**
    * 
    * @type {Array<string>}
    * @memberof LogsApiDelete
    */
    readonly id?: Array<string>
    
}

/**
 * Request parameters for list operation in LogsApi.
 * @export
 * @interface LogsApiListRequest
 */
export type LogsApiListRequest = {
    
    /**
    * 
    * @type {string}
    * @memberof LogsApiList
    */
    readonly projectId: string
    
    /**
    * 
    * @type {string}
    * @memberof LogsApiList
    */
    readonly search?: string
    
    /**
    * 
    * @type {string}
    * @memberof LogsApiList
    */
    readonly metadataSearch?: string
    
    /**
    * 
    * @type {string | Date}
    * @memberof LogsApiList
    */
    readonly startDate?: string | Date
    
    /**
    * 
    * @type {string | Date}
    * @memberof LogsApiList
    */
    readonly endDate?: string | Date
    
    /**
    * 
    * @type {number}
    * @memberof LogsApiList
    */
    readonly size?: number
    
    /**
    * 
    * @type {number}
    * @memberof LogsApiList
    */
    readonly page?: number
    
}

/**
 * Request parameters for log operation in LogsApi.
 * @export
 * @interface LogsApiLogRequest
 */
export type LogsApiLogRequest = {
    
} & LogDatapointRequest

/**
 * Request parameters for update operation in LogsApi.
 * @export
 * @interface LogsApiUpdateRequest
 */
export type LogsApiUpdateRequest = {
    
    /**
    * String ID of logged datapoint to return. Starts with `data_`.
    * @type {string}
    * @memberof LogsApiUpdate
    */
    readonly id: string
    
} & UpdateLogRequest

/**
 * Request parameters for updateByRef operation in LogsApi.
 * @export
 * @interface LogsApiUpdateByRefRequest
 */
export type LogsApiUpdateByRefRequest = {
    
    /**
    * A unique string to reference the datapoint. Identifies the logged datapoint created with the same `reference_id`.
    * @type {string}
    * @memberof LogsApiUpdateByRef
    */
    readonly referenceId: string
    
} & UpdateLogRequest

/**
 * LogsApiGenerated - object-oriented interface
 * @export
 * @class LogsApiGenerated
 * @extends {BaseAPI}
 */
export class LogsApiGenerated extends BaseAPI {
    /**
     * 
     * @summary Delete Logs
     * @param {LogsApiDeleteRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof LogsApiGenerated
     */
    public delete(requestParameters: LogsApiDeleteRequest, options?: AxiosRequestConfig) {
        return LogsApiFp(this.configuration).delete(requestParameters, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Retrieve paginated logs from the server.  Sorting and filtering are supported through query params. See docstring of get_sorted_filtered_project_data_from_query_params for more details.
     * @summary Get Logs
     * @param {LogsApiListRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof LogsApiGenerated
     */
    public list(requestParameters: LogsApiListRequest, options?: AxiosRequestConfig) {
        return paginate({
            initialParameters: requestParameters,
            request: (parameters: LogsApiListRequest) => {
                return LogsApiFp(this.configuration).list(parameters, options).then((request) => request(this.axios, this.basePath));
            },
        });
    }

    /**
     * Log a datapoint or array of datapoints to your Humanloop project.
     * @summary Log
     * @param {LogsApiLogRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof LogsApiGenerated
     */
    public log(requestParameters: LogsApiLogRequest, options?: AxiosRequestConfig) {
        return LogsApiFp(this.configuration).log(requestParameters, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Update a logged datapoint in your Humanloop project.
     * @summary Update
     * @param {LogsApiUpdateRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof LogsApiGenerated
     */
    public update(requestParameters: LogsApiUpdateRequest, options?: AxiosRequestConfig) {
        return LogsApiFp(this.configuration).update(requestParameters, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * Update a logged datapoint by its reference ID.  The `reference_id` query parameter must be provided, and refers to the `reference_id` of a previously-logged datapoint.
     * @summary Update By Reference Id
     * @param {LogsApiUpdateByRefRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof LogsApiGenerated
     */
    public updateByRef(requestParameters: LogsApiUpdateByRefRequest, options?: AxiosRequestConfig) {
        return LogsApiFp(this.configuration).updateByRef(requestParameters, options).then((request) => request(this.axios, this.basePath));
    }
}
